﻿<%@ Page Language="C#" MasterPageFile="AdminSite.master" AutoEventWireup="true" CodeFile="QuanLyAlbum.aspx.cs"
    Inherits="QuanLyAlbum" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        .style1
        {
            width: 106px;
        }
        .style2
        {
        }
        .style4
        {
            height: 21px;
        }
        #Button1
        {
            width: 147px;
            height: 25px;
        }
    </style>
    <script type="text/javascript">
        function newAlbum() {
            window.location = "QuanLyHinhAnh.aspx";
        }
    </script>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2 align="center" style="font-weight: bold">
        QUẢN LÝ ALBUMN ẢNH
    </h2>
    <table style="width: 100%">
    <tr>
    <td>
       <input id="Button1"  class="btnadmin" type="button" value=" + Tạo albumn ảnh" onclick="newAlbum()" /></td>
    </tr>
    <tr>
    <td align="center"> 
    <asp:Label id="lblNoctice" runat="server" Font-Bold="True" ForeColor="Red" 
            Visible="False"></asp:Label>
    </td></tr>
        <tr>
            <td align="center">
                <asp:DataList ID="listImage" RepeatLayout="Table" RepeatColumns="4" RepeatDirection="Horizontal"
                    runat="server">
                    <ItemTemplate>
                        <fieldset class="btn_img">
                            <table cellpadding="2" cellspacing="0" border="0" width="100%">
                                <tr>
                                    <td align="center">
                                        <a href='QuanLyHinhAnh.aspx?albumid=<%#Eval("album_id") %>' title='Xem album ảnh'>
                                            <asp:Image ID="img_first" runat="server" Width="160" Height="160" class="img_border"
                                                ImageUrl='<%# Eval("THUMBNAIL")%>' /></a>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center">
                                        <a  class="btn_link"  href='QuanLyHinhAnh.aspx?albumid=<%#Eval("album_id") %>' title='Xem album ảnh'>
                                            <%# Eval("TEN_ALBUM") %></a></b>
                                    </td>
                                </tr>
                                <tr style="font-size: 11px">
                                    <td>
                                        Tạo bới: <b>
                                            <%#Eval("NGUOI_TAO") %></b>
                                    </td>
                                </tr>
                                <tr style="font-size: 11px">
                                    <td>
                                        Ngày tạo:<b><%#Eval("NGAY_TAO","{0:dd/MM/yyyy HH:mm:ss }") %></b></td>
                                </tr>
                                <tr>
                                    <td align="center" valign="middle" >
                                        <a  class="btn_link"  href='QuanLyHinhAnh.aspx?albumid=<%#Eval("album_id") %>' title='Sửa album ảnh'>Sửa</a>
                                        |
                                        <asp:LinkButton CssClass="btn_link" ID="btnDel" CommandName="cmdDel" OnClientClick="return confirm('Xóa album này sẽ xóa hết các hình ảnh của album.\nBạn có chắc là muốn xóa?');"
                                            runat="server" CommandArgument='<%# Eval("album_id") %>' OnClick="btnDel_cLick">
                                                   Xóa                   
                                        </asp:LinkButton>
                                    </td>
                                </tr>
                            </table>
                            </font>
                        </fieldset>
                    </ItemTemplate>
                </asp:DataList>
            </td>
        </tr>
    </table>
</asp:Content>
